export enum fieldType {
  singleLineText = 1,
  multiLineText = 2,
  number = 3,
  radio = 4,
  checkbox = 5,
  select = 6,
  dateTime = 7,
  text = 8,
  upload = 9,
  cycleEvent = 10,
  cascader = 11,
  fixedCombination = 12,
  packing = 14
}
export const fieldTypeOpstion = [
  {
    label: '单行文本',
    code: 'input',
    value: fieldType.singleLineText,
    type: 'basicComponents'
  },
  {
    label: '多行文本',
    code: 'textarea',
    value: fieldType.multiLineText,
    type: 'basicComponents'
  },
  {
    label: '数值',
    code: 'number',
    value: fieldType.number,
    type: 'basicComponents'
  },
  {
    label: '单选框',
    code: 'radio',
    value: fieldType.radio,
    type: 'selectComponents'
  },
  {
    label: '复选框',
    code: 'checkbox',
    value: fieldType.checkbox,
    type: 'selectComponents'
  },
  {
    label: '下拉框',
    code: 'select',
    value: fieldType.select,
    type: 'selectComponents'
  },
  {
    label: '日期时间',
    code: 'date',
    value: fieldType.dateTime,
    type: 'selectComponents'
  },
  {
    label: '说明文字',
    code: 'text',
    value: fieldType.text,
    type: 'basicComponents'
  },
  {
    label: '文件上传',
    code: 'upload',
    value: fieldType.upload,
    type: 'selectComponents'
  },
  {
    label: '级联选择',
    code: 'cascader',
    value: fieldType.cascader,
    type: 'selectComponents'
  },
  {
    label: '固定组合',
    code: 'fixedCombination',
    value: fieldType.fixedCombination,
    type: 'layoutComponents'
  },
  {
    label: '包装规格',
    code: 'packing',
    value: fieldType.packing,
    type: 'selectComponents'
  }
]

export interface WidgetForm {
  list: any[]
  config: {
    formName: string
    formType: number | undefined
    projectType: number | undefined
    promptInfo: string
    createUserName?: string | undefined
    createTime?: string | undefined
    lastEditUserName?: string | undefined
    lastEditTime?: string | undefined
    size: any
    hideRequiredMark: boolean
    layout: any
    labelAlign: any
    labelCol?: {
      gridLayoutNumber: number
      offset: number
    }
  }
  deleteFieldIds: string[]
}
